package com.lijian.reptile.ui;

import com.lijian.reptile.model.Read;

import javax.swing.*;
import java.awt.*;

/**
 * ClassName: Perview
 * Description:
 * date: 2021/11/25 0025 下午 8:03
 *
 * @author LiJian
 * @since JDK 1.8
 */
public class Perview extends JFrame {
    //容器
    private JPanel jPanel = new JPanel();
    //文本域用来接收数据
    public static JTextArea jTA = new JTextArea();
    //文本域的滚动条  是一个滚动面版，只能添加一个组件
    private  JScrollPane jsp = new JScrollPane(jTA);

    public Perview() {
        jPanel.add(jsp);
        jTA.setLineWrap(true);
        jTA.setEditable(true);

        jsp.setPreferredSize(new Dimension(550,400));

        add(jPanel,BorderLayout.CENTER);
        setTitle("我的预览");
        setBounds(300,100,600,500);
        setResizable(false);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
        new Read().send(MyFrame.jtf_url.getText().trim());
    }
}
